<?php
function trimValues(&$arrays)
        {
        foreach($arrays as $key=>$value)
                {
                if(is_array($value))
                        {
                        trimValues($value);
                        $arrays[$key]=$value;
                        }
                else
                        $arrays[$key]=trim($value);
                }
        }

function addQuotes(&$arrays,$exclude_columns="")
        {
        foreach($arrays as $key=>$value)
                {
                if(is_array($value))
                        {
                        addQuotes($value,$exclude_columns);
                        $arrays[$key]=$value;
                        }
                else
                        $arrays[$key]=($exclude_columns)?(in_array($key,$exclude_columns)?$value:"'".$value."'"):"'".$value."'";
                }
        }
?>